<extend name="Public:base"/>

<block name="main">
<div id="yzh-content" class="col-xs-12">

    <div class="main-title">
        <h2>模型管理</h2>
    </div>

    <form name="myform" action="{:U('Module/edit')}" method="post" class="form-horizontal">
        <div class="form-group">
            <label class="control-label col-md-2"><font color="red">*</font>模型名称</label>
            <div class="col-md-5">
                <input type="text" id="title" class="form-control" name="title" value="{$vo.title}" size="20" class="input-text required" minlength="2" title="{:L(module_tip_title)}" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2"><font color="red">*</font>模型表名</label>
            <div class="col-md-5">
                <input type="text" id="name" class="form-control" name="name" disabled="disabled" value="{$vo.name}" size="20" class="input-text"  validate="required:true, english:true,remote: '{:U($module_name.'/insert?isajax=1')}' ,minlength:2, maxlength:30" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">列表页调用字段</label>
            <div class="col-md-5">
                <input type="text" id="listfields" class="form-control" name="listfields"  class="input-text" size="55" value="<if condition="empty($vo['listfields'])">*<else />{$vo.listfields}</if>" /> {:L(examples)}:id,title,url,catid
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">前台搜索模型</label>
            <div class="col-md-5">
                {:Form::radio(array('field'=>'issearch','options'=>array('1'=>L('yes'),'0'=>L('no'))),$vo['issearch'])}
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2">模型简介</label>
            <div class="col-md-5">
                <textarea id="description" class="form-control" name="description" rows=4"" cols="55">{$vo.description}</textarea>
            </div>
        </div>
        <div  class="btn">
            <input type="hidden" name="id" value="{$vo.id}">
            <input type="submit"  value="{:L('dosubmit')}" class="btn btn-sm btn-primary" />
            <input type="reset"  value="{:L('cancel')}" class="btn btn-sm btn-primary"/>
        </div>
    </form>
</div>
</block>